<template>
  <view class="component">
    <view :class="`text-deleted-item'}`" :bind="computedAttrs" @tap="handleClick">
        <text class="text">{{ data.text }}</text>
        <text class="icon iconfont icon-a-24_24_fill_close"></text>
      </view>
  </view>
</template>

<script setup>
const props = defineProps({
  data: Object, // 数据
  config: {
    type: Object,
    default: () => {
      return {};
    }
  }
});

const injectOperateFn = inject('operate');
const handleClick = () => {
  // 事件selected， 数据
  injectOperateFn('onDeleted', props.data)

}
</script>

<style lang="scss" scoped>
@import "@/static/scss/theme.scss";

.text-deleted-item {
  font-size: 26rpx;
  height: 96rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .text {
    line-height: 38rpx;
    font-weight: 500;
  }
}
</style>